import java.text.*;
public class Event {
	private Costs cost;
	private int numOfAdults, numOfChildren;
	private double adultCost, dessertCost, roomFee, tipAndTax, depositSum;
	NumberFormat money= NumberFormat.getCurrencyInstance();
	public Event(int numAdults, int numChildren, double aCost, double dCost, double rFee, double tTax, double dSum) {
		cost = new Costs(aCost, dCost, numAdults, numChildren, rFee, tTax, dSum);
		adultCost=aCost;
		dessertCost = dCost;
		numOfAdults=numAdults;
		numOfChildren = numChildren;
		tipAndTax= tTax;
		roomFee = rFee;
		depositSum=dSum;
	}
	public int getNumOfAdults() {
		return numOfAdults;
	}
	public void setNumOfAdults(int numOfAdults) {
		this.numOfAdults = numOfAdults;
	}
	public int getNumOfChildren() {
		return numOfChildren;
	}
	public void setNumOfChildren(int numOfChildren) {
		this.numOfChildren = numOfChildren;
	}
	public double getAdultCost() {
		return adultCost;
	}
	public void setAdultCost(double adultCost) {
		this.adultCost = adultCost;
	}
	public double getDessertCost() {
		return dessertCost;
	}
	public void setDessertCost(double dessertCost) {
		this.dessertCost = dessertCost;
	}
	public double getRoomFee() {
		return roomFee;
	}
	public void setRoomFee(double roomFee) {
		this.roomFee = roomFee;
	}
	public double getTipAndTax() {
		return tipAndTax;
	}
	public void setTipAndTax(double tipAndTax) {
		this.tipAndTax = tipAndTax;
	}
	public double getDepositSum() {
		return depositSum;
	}
	public void setDepositSum(double depositSum) {
		this.depositSum = depositSum;
	}

	public String toString() {
		String endString;
		endString = "Caswell Catering and Convention Service\n";
		endString += "Final Bill\n";
		endString += "\n";
		endString += "Number of adults: 			"+numOfAdults+"\n";
		endString += "Number of children: 			"+numOfChildren+"\n";
		endString += "Cost per adult without dessert: 	"+money.format(adultCost)+"\n";
		endString += "Cost per child without dessert: 	"+money.format((adultCost * 0.6))+"\n";
		endString += "Cost per dessert: 			"+money.format(dessertCost)+"\n";
		endString += "Room Fee: 				"+roomFee+"\n";
		endString += "Tip and tax rate: 			"+tipAndTax+"%\n";
		endString += "	\n";
		endString += "Total cost for adult meals: 		"+money.format(cost.getAdultCost())+"\n";
		endString += "Total cost for child meals: 		"+money.format(cost.getChildCost())+"\n";
		endString += "Total cost for dessert: 		"+money.format(dessertCost * (numOfAdults + numOfChildren))+"\n";
		endString += "Total food cost: 			"+money.format(cost.getFoodCost())+"\n";
		endString += "Plus tip and tax: 			"+money.format(cost.getFoodCostWithTipTax())+"\n";
		endString += "Plus room fee: 				"+money.format(cost.getTotalCostWithRoomFee())+"\n";
		endString += "Less deposit: 				"+money.format(cost.getFinalCost())+"\n";
		endString += "	\n";
		endString += "Balance due:	    			"+money.format(cost.getFinalCost())+"\n";
		return endString;
	}
}
